1. Field of the Invention
This invention relates to a collision alarm method and apparatus for vehicles, and more particularly, to a collision alarm method and apparatus for vehicles in which diagonally rearward photographs or forward photographs of a vehicle, such as an automobile, are taken with a photographing device such as a small, on-board CCD camera, and based on the images photographed the possibility of collision with another vehicle approaching from the diagonally rearward direction or traveling ahead is detected and alarmed to the driver by means of an alarm sound or the like.
2. Description of the Related Art
If, for example, during traveling on a superhighway the driver of a vehicle changes lanes without noticing another vehicle approaching in the adjoining lane to which he switches at a higher speed from the diagonally backward direction, a severe accident may be caused.
Further, if the driver of a vehicle suddenly brakes without noticing another vehicle approaching him from the backward direction in the same lane at a higher speed, it is likely that the another vehicle bumps into the rear of the driver's vehicle. It is thus necessary for the driver to notice vehicles around him. Likewise, if the driver of a vehicle swiftly approaches another vehicle traveling ahead of him and the another vehicle suddenly brakes, the driver may bump into the rear of the another vehicle. It is thus also necessary for the driver to recognize vehicles running ahead.
To cope with this problem, a method is proposed in Japanese Patent Applications Unexamined Publications Nos. 6-107096 and 7-50769 according to which optical flow is used to detect the approach to another vehicle running ahead and the approach of another vehicle from the diagonally backward direction and give an alarm in case of danger of collision.
In these conventional techniques, optical flow is obtained by processing two images obtained by photographing at different times the front view or the diagonal rear view of a vehicle with an on-board video camera, and by making use of a property of the optical flow, the degree of possibility of collision with another, approaching vehicle is judged. In other words, the property is used that the length of optical flow derived from the approaching vehicle becomes greater as the vehicle approaches at higher speed and the approaching vehicle comes closer to the vehicle with the on-board video camera. The approaching speed of and the distance to the approaching vehicle cannot be independently calculated from the optical flow.
In the above-mentioned conventional techniques, to obtain optical flow, as shown in FIG. 9, points A and B of variant brightness on the approaching vehicle in the two photographed images (A in the previously taken image and B in the later taken image) are selected as points to notice, and correlation windows WA and WB are set around the respective points A and B to process the pixels inside the correlation windows and extract the optical flow.
With the conventional techniques, however, there is a drawback in that the correlation window around the noticeable point cannot be made large in size if its processing time is taken into consideration, and if made with a size of 7 pixels.times.7 pixels, accuracy in detecting corresponding points in the two images photographed at different times will be lowered. Besides, if a large number of points of variant brightness exist on the approaching vehicle, the points to notice correspondingly increase, resulting in a longer time required for the processing.
Incidentally, it takes time before the driver, on being alarmed of a possible collision, takes action to correct his driving and avoid the collision. It is thus desirable that such an alarm be generated prior to the time required for completion of the action to avoid the possible collision.